--autotest_interface_BPM库快照还原
USE master
GO
DECLARE @dbName NVARCHAR(max)='autotest_interface_BPM';
DECLARE @KZName NVARCHAR(max)='autotest_interface_BPM_KZ';
exec(N'ALTER DATABASE '+@dbName+' SET SINGLE_USER WITH ROLLBACK IMMEDIATE');
RESTORE DATABASE @dbName FROM DATABASE_SNAPSHOT = @KZName;
---将数据库使用权限改为多用户模式
exec(N'ALTER DATABASE '+@dbName+' SET MULTI_USER WITH ROLLBACK IMMEDIATE');
PRINT @dbName+'【还原】还原快照完成'

--autotest_interface_BPM_ERP35库快照还原
USE master
GO
DECLARE @dbName NVARCHAR(max)='autotest_interface_BPM_ERP35';
DECLARE @KZName NVARCHAR(max)='autotest_interface_BPM_ERP35_KZ';
exec(N'ALTER DATABASE '+@dbName+' SET SINGLE_USER WITH ROLLBACK IMMEDIATE');
RESTORE DATABASE @dbName FROM DATABASE_SNAPSHOT = @KZName;
---将数据库使用权限改为多用户模式
exec(N'ALTER DATABASE '+@dbName+' SET MULTI_USER WITH ROLLBACK IMMEDIATE');
PRINT @dbName+'【还原】还原快照完成'
